package dao;

import java.util.List;

import org.hibernate.Session;

import modele.Profil;


import persistence.BaseDAO;

public class ProfilDAO{
	
	public static void ajouterProfil(Profil profil, Session session) throws Exception{
		BaseDAO.getInstance().ajouter(profil,session);
	}

	public static void modifierProfil(Profil profil, Session session) {
		BaseDAO.getInstance().modifier(profil,session);
	}

	public static void SupprimerProfil(Profil profil, Session session) {
		BaseDAO.getInstance().delete(profil,session);
	}

	public static void getProfil(int id, Session session) {
		BaseDAO.getInstance().getObject(Profil.class, id,session);
	}

	public static List getListProfil(String requette, Session session) {
		return BaseDAO.getInstance().getListObject(requette,session);
	}

	public static List getListProfil(String requete, Session session, int firstResult,
			int maxResults) {
		return BaseDAO.getInstance().getLimitedListObject(requete, firstResult, maxResults, session);
	}

}
